<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>03_创建组件语法糖.html</title>
</head>
<body>
    <div id="app">
        <cpn1></cpn1>
        <cpn2></cpn2>
    </div>
</body>
<script src="../vue.js"></script>
<script>
    //创建全局组件语法糖
    Vue.component('cpn1',{
        template:`<h3>创建全局组件语法糖--1</h3>`
    })

    new Vue({
        el: '#app',
        components: {
           'cpn2': {
               template: `<h2>创建局部组件语法糖--2</h2>`
           }
        }
    })
</script>
</html>